home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / srcuc.zip / OSCOND.H < prev    next >
C/C++ Source or Header  |  1992-05-04  |  4KB  |  165 lines

  1. /* -*-C-*-
  2.  
  3. $Header: /scheme/src/microcode/RCS/oscond.h,v 1.8 1992/05/04 20:44:20 jinx Exp $
  4.  
  5. Copyright (c) 1990-92 Massachusetts Institute of Technology
  6.  
  7. This material was developed by the Scheme project at the Massachusetts
  8. Institute of Technology, Department of Electrical Engineering and
  9. Computer Science.  Permission to copy this software, to redistribute
  10. it, and to use it for any purpose is granted, subject to the following
  11. restrictions and understandings.
  12.  
  13. 1. Any copy made of this software must include this copyright notice
  14. in full.
  15.  
  16. 2. Users of this software agree to make their best efforts (a) to
  17. return to the MIT Scheme project any improvements or extensions that
  18. they make, so that these may be included in future releases; and (b)
  19. to inform MIT of noteworthy uses of this software.
  20.  
  21. 3. All materials developed as a consequence of the use of this
  22. software shall duly acknowledge such use, in accordance with the usual
  23. standards of acknowledging credit in academic research.
  24.  
  25. 4. MIT has made no warrantee or representation that the operation of
  26. this software will be error-free, and MIT is under no obligation to
  27. provide any services, by way of maintenance, update, or otherwise.
  28.  
  29. 5. In conjunction with products arising from the use of this material,
  30. there shall be no use of the name of the Massachusetts Institute of
  31. Technology nor of any adaptation thereof in any advertising,
  32. promotional, or sales literature without prior written consent from
  33. MIT in each case. */
  34.  
  35. /* Operating System Conditionalizations.
  36.    Identify the operating system, its version, and generalizations. */
  37.  
  38. #ifndef SCM_OSCOND_H
  39. #define SCM_OSCOND_H
  40.  
  41. /* _POSIX is assumed to be independent of all operating-system and
  42.    machine specification macros.  */
  43.  
  44. #if defined(__hpux) && !defined(hpux)
  45. #define hpux
  46. #endif
  47.  
  48. #if defined(__hp9000s300) && !defined(hp9000s300)
  49. #define hp9000s300
  50. #endif
  51.  
  52. #if defined(__hp9000s400) && !defined(hp9000s400)
  53. #define hp9000s400
  54. #endif
  55.  
  56. #if defined(__hp9000s700) && !defined(hp9000s700)
  57. #define hp9000s700
  58. #endif
  59.  
  60. #if defined(__hp9000s800) && !defined(hp9000s800)
  61. #define hp9000s800
  62. #endif
  63.  
  64. #if defined(hpux) && !defined(_HPUX)
  65. #define _HPUX
  66. #endif
  67.  
  68. #ifdef _HPUX
  69. #ifdef __hpux
  70.  
  71. #define _POSIX
  72. #define _SYSV3
  73.  
  74. #include <a.out.h>
  75. #ifdef SHL_MAGIC
  76. #define _HPUX_VERSION 80
  77. #else
  78. #define _HPUX_VERSION 70
  79. #endif
  80.  
  81. #else /* not __hpux */
  82.  
  83. #define _SYSV
  84.  
  85. /* Definitions in this file identify the operating system version. */
  86. #include <signal.h>
  87.  
  88. #ifdef hp9000s300
  89. #ifdef SV_BSDSIG
  90. #define _HPUX_VERSION 65
  91. #else
  92. /* Versions prior to 6.2 aren't worth dealing with anymore. */
  93. #define _HPUX_VERSION 62
  94. #endif
  95. #endif
  96.  
  97. #ifdef hp9000s800
  98. #ifdef SV_RESETHAND
  99. #define _HPUX_VERSION 65 /* actually, 3.0 */
  100. #else
  101. /* Versions prior to 2.0 aren't worth dealing with anymore. */
  102. #define _HPUX_VERSION 62 /* actually, 2.0 */
  103. #endif
  104. #endif
  105.  
  106. #endif /* __hpux */
  107. #endif /* _HPUX */
  108.   
  109. #ifdef _SYSV4
  110. #define _POSIX
  111. #define _SYSV3
  112. #endif
  113.  
  114. #ifdef _SYSV3
  115. #define _SYSV
  116. #endif
  117.  
  118. #if defined(_NEXTOS)
  119.  
  120. #define _BSD4_3
  121.  
  122. #include <sys/port.h>
  123. #ifdef PORT_BACKLOG_DEFAULT
  124. #define _NEXTOS_VERSION 20
  125. #else
  126. #define _NEXTOS_VERSION 10
  127. #endif
  128.  
  129. #endif /* _NEXTOS */
  130.  
  131. #if defined(_ULTRIX)
  132. #define _POSIX
  133. #define _BSD4_3
  134. #endif
  135.  
  136. #if defined(_SUNOS3) || defined(_SUNOS4)
  137. #define _SUNOS
  138. #define _BSD4_2
  139. #endif
  140.  
  141. #if defined(_BSD4_2) || defined(_BSD4_3)
  142. #define _BSD
  143. #endif
  144.  
  145. #if defined(_BSD) && defined(_SYSV)
  146. #include "error: can't define both _BSD and _SYSV"
  147. #endif
  148.  
  149. #if defined(DOS386)
  150. #  define _DOS386
  151. #  define _DOS386_VERSION    50
  152. #endif
  153.  
  154. #if defined(_BSD) || defined(_SYSV) || defined(_PIXEL)
  155. #  define _UNIX
  156. #else
  157. #  ifdef _DOS386
  158. #    define _DOS
  159. #  else
  160. #    include "error: unknown unix system -- you must add customizations"
  161. #  endif /* _DOS386 */
  162. #endif /* _BSD || _SYSV || _PIXEL */
  163.  
  164. #endif /* SCM_OSCOND_H */
  165.